﻿@model Huirui.Cavan.Presentation.ViewModel.SystemModule.IDepartmentViewModel
@{
    var selectDepartmentWindow = "selectDepartmentWindow" + Model.Purpose;
    var departmentTableid = "departments" + Model.Purpose;
    var doSelectDepartment = "doSelectDepartment" + Model.Purpose;
}
<div id="@selectDepartmentWindow" class="easyui-window" data-options="closed:true,minimizable:false,maximizable:false,collapsible:false,title:'@Html.Raw("选择部门")',modal:true" style="width: 600px; height: 400px; padding: 2px;">
    @using (Html.BeginForm(ActionConst.SEARCH, ControllerConst.DEPARTMENT, FormMethod.Post, new { id = "searchDepartment" + Model.Purpose }))
    {  <input id="select_dptwind" type="submit" value="搜索" style="display: none" />
        <table class="form_heard">
            <tr>
                <td class="c160">
                    @Html.TextBoxFor(m => m.SearchParam.Name, new Dictionary<string, object>() { { "id", "select_dept_search" }, { "class", "easyui-searchbox" }, { "style", "width:200px" }, { "data-options", "searcher:search_dept,prompt:'请输入部门名称'" } })
                </td>
                <td class="c100">
                    <a href="#" id="@doSelectDepartment" class="easyui-linkbutton" iconcls="icon-ok" plain="true">确定部门</a>
                </td>
            </tr>
        </table>
           
            
       
    }
    <table id="@departmentTableid" title="部门列表">
    </table>
</div>
<script type="text/javascript">
    function search_dept(value, name)
    {
        $('#select_dptwind').click();
    }
</script>
